//
//  OnMarketForthTableViewCell.m
//  BSLCar
//
//  Created by 梁毅 on 15/6/2.
//  Copyright (c) 2015年 lyz. All rights reserved.
//

#import "OnMarketForthTableViewCell.h"

@interface OnMarketForthTableViewCell ()

@property (nonatomic, retain) UILabel *label;

@end

@implementation OnMarketForthTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self tableCell];
    }
    return self;
}
- (void)tableCell
{

    self.label = [[UILabel alloc] init];
    [self.contentView addSubview:self.label];
    
    self.labelprice = [[UILabel alloc]init];
    [self.contentView addSubview:self.labelprice];
    
    self.button = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.contentView addSubview:self.button];
    
    self.lablelAddress = [[UILabel alloc]init];
    [self.contentView addSubview:self.lablelAddress];
    
    self.lablelName = [[UILabel alloc]init];
    [self.contentView addSubview:self.lablelName];
    
    self.mimageView = [[UIImageView alloc]init];
    [self.contentView  addSubview:self.mimageView];
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.lablelName.frame = CGRectMake(10, 5, self.bounds.size.width - 10, 30);
    self.lablelAddress.frame = CGRectMake(10, 40, self.bounds.size.width - 20, 30);
    self.lablelAddress.font = [UIFont systemFontOfSize:11];
    self.lablelAddress.numberOfLines = 2;
    [self.lablelAddress sizeToFit];
    self.labelprice.frame = CGRectMake(40, 10, self.bounds.size.width - 50, 30);
        self.labelprice.textAlignment = NSTextAlignmentRight;
    

//    self.button.frame = CGRectMake(240 , 30, self.bounds.size.width - 250, 50);

    self.button.frame = CGRectMake(self.bounds.size.width - 35, 60, 25, 20);
 //   self.button.backgroundColor = [UIColor blueColor];

    
    self.label.frame = CGRectMake(5, 79, self.bounds.size.width - 10, 1);
    self.label.backgroundColor = [UIColor grayColor];
    self.label.alpha = .4f;
    
}
- (void)awakeFromNib {
    // Initialization code
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
